<?php
$vars = "";
$path = "";
$count = 1;
//$thePath = "gamesongs/";
//$path = $thePath;


if (isset($_REQUEST['thePath'])) {
	$path = $_REQUEST['thePath'];
}


if ($dir = opendir($path)) {
	   while (false !== ($file = readdir($dir))) {
			if ($file != '.' && $file != '..') {
				if(!is_dir($path.$file)) {
					$vars .= "&var".$count."=".$path.$file;										
					$count++;
				} 
			}
	   }
	   closedir ($dir) ;
}

//echo "Game Songs:/n<br />";
echo $vars;

?>